import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { IonButton, ToastController } from '@ionic/angular';

@Component({
  selector: 'app-left-view',
  templateUrl: './left-view.component.html',
  styleUrls: ['./left-view.component.scss'],
})
export class LeftViewComponent implements OnInit , AfterViewInit{

  @ViewChild('allWillRead')
  allWillRead:IonButton

  constructor(public toastController: ToastController) {}

  async presentToast() {
    const toast = await this.toastController.create({
      message: 'Your settings have been saved.',
      duration: 2000,
      color: 'warning'
    });
    toast.present();
  }

  ngOnInit() {
    
  }

  ngAfterViewInit(){
      
  }

  async onClick($event){
    await this.presentToast()
  }

}
